package client.messageContent;

import common.CurrencyEnum;
import common.SerializationManager;
import common.data.DepositArgs;
import common.interfaces.MessageContent;

public class DepositMsgContent extends DepositArgs implements MessageContent {
	private int length;
	private byte[] data;
	public DepositMsgContent(String holderName, long accountNumber,
			String password, CurrencyEnum currency, float depositAmount) {
		this.holderName = holderName;
		this.accountNumber = accountNumber;
		this.password = password;
		this.depositAmount = depositAmount;
		this.currency = currency;
	}

	@Override
	public byte[] getByte(){
		try {
			data = SerializationManager.getCurrent().fromObject(this);
		} catch (IllegalArgumentException | IllegalAccessException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		return data;		
	}

	@Override
	public int getLength() {
		// TODO Auto-generated method stub
		return this.length;
	}

}
